home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
glass
/
glass.lha
/
GLASS
/
dtm
/
test31.gl
< prev
next >
Wrap
Text File
|
1991-06-18
|
345b
|
24 lines
Basetype E;
Atom
tff :- E & E => E,
one :- <> => E,
not :- E => E;
Def
div2 :- E => E;
div2 ck = tff [ck, one[]];
Mac
chainctr :- Int -: n -> E => E^n;
chainctr 1 ck = [div2 ck];
chainctr n ck = q:Q
where
Q = chainctr (n-1) q;
q = div2 ck;
endwhere;
Def
ctr4 :- E => E^4;
ctr4 ck = chainctr 4 ck;